/*******************************************************************************
 * TTC- Android Application Development 1 - K18 -Group 2. 
 *******************************************************************************/
/*******************************************************************************
 * TTC- Android Application Development 1 - K18 -Group 2. 
 *******************************************************************************/
package fhq.hcmute.edu.vn.system;

import fhq.hcmute.edu.vn.util.R;

public enum FileType {
	harddisk(R.drawable.harddisk), folder(R.drawable.folder), txt(
			R.drawable.txt), doc(R.drawable.doc), docx(R.drawable.docx), xls(
			R.drawable.xls), xlsx(R.drawable.xls), png(R.drawable.png), ppt(
			R.drawable.ppt), pptx(R.drawable.pptx), mp3(R.drawable.mp3), mp4(
			R.drawable.mp4), avi(R.drawable.avi), mkv(R.drawable._7zip), pdf(
			R.drawable.pdf), rar(R.drawable.rar), tar(R.drawable.tar), zip(
			R.drawable.zip), exe(R.drawable.exe), bmp(R.drawable.bmp), jpg(
			R.drawable.jpg), aac(R.drawable.aac), accdb(R.drawable.accdb), ace(
			R.drawable.ace), aiff(R.drawable.aiff), ape(R.drawable.ape), arj(
			R.drawable.arj), asf(R.drawable.asf), cab(R.drawable.cab), cgi(
			R.drawable.cgi), css(R.drawable.css), dat(R.drawable.dat), divx(
			R.drawable.divx), eml(R.drawable.eml), eps(R.drawable.eps), fla(
			R.drawable.fla), flac(R.drawable.flac), gif(R.drawable.gif), js(
			R.drawable.js), jsf(R.drawable.jsf), midi(R.drawable.midi), mov(
			R.drawable.mov), mpc(R.drawable.mpc), mpeg(R.drawable.mpeg), mpeg4(
			R.drawable.mpeg4), ogg(R.drawable.ogg), psd(R.drawable.psd), php(
			R.drawable.php), pl(R.drawable.pl), pst(R.drawable.pst), html(
			R.drawable.html), ini(R.drawable.ini), jpeg(R.drawable.jpeg),

	readme(R.drawable.readme), rm(R.drawable.rm), rtf(R.drawable.rtf), settings(
			R.drawable.settings), svcd(R.drawable.svcd), swf(R.drawable.swf), tag(
			R.drawable.tag), tiff(R.drawable.tiff),

	vcd(R.drawable.vcd), vob(R.drawable.vob), vqf(R.drawable.vqf), vsd(
			R.drawable.vsd), wav(R.drawable.wav), wma(R.drawable.wma),

	wmv(R.drawable.wmv), wpd(R.drawable.wpd), xhtml(R.drawable.xhtml), xml(
			R.drawable.xml), xvid(R.drawable.xvid), undefined(
			R.drawable.undefined);

	private int i;

	FileType(int i) {
		this.i = i;
	}

	public int getValue() {
		return i;
	}

	public static FileType fromString(String text) {
		if (text != null) {
			for (FileType b : FileType.values()) {
				if (text.equalsIgnoreCase(b.name())) {
					return b;
				}
			}
		}
		return undefined;
	}
}
